<%@ page language="java" contentType="text/html; charset=UTF-8"
   pageEncoding="UTF-8"%>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.Statement" %>
<%@ page import="java.sql.ResultSet" %>
<%@ page import="schronisko.MySQLConnection" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link rel="stylesheet" type="text/css" href="styles/forms.css">
<title>Usuń zwierzaka</title>
</head>
<body>
<form action="AnimalDelete" method="POST">
<%
	ResultSet result = MySQLConnection.connect().executeQuery("SELECT ID_animal, name FROM animal");
%>
<h2>Usuwanie zwierzaka</h2><br>
<p class="center">
Wybierz zwierzaka z listy:
				<select name="wybierz_zwierzaka" id="user">
				<%
				while(result.next()){
				int id = result.getInt("ID_animal"); 
      			String name = result.getString("name"); %>
				<option value="<%=id %>"><%=id+". "+name%></option>
				
			<% }%>
			</select><br>
				<input type="submit" id="submit" value="Usuń" /><br>
				<a class="menu"  href="/to-z9-schronisko/index.jsp">Wróć</a>
				<%
	MySQLConnection.Close(); 
	%>
	</form>
</body>
</html>